let circle = document.querySelector(".circle");
let con = document.querySelector(".container");

con.addEventListener("click", (event) => {
  circle.style.display = "none";
  let x = event.offsetX;
  let y = event.offsetY;
  console.log(x);
  console.log(y);
  console.log(event);
  x -= 150;
  y -= 150;
  circle.style.left = x + "px";
  circle.style.top = y + "px";
  circle.style.display = "flex";
  circle.classList.add("animate");
  // 动画结束后移除 'animate' 类
  circle.addEventListener(
    "animationend",
    function () {
      circle.classList.remove("animate");
      circle.style.display = "none";
    },
    { once: true }
  );
});
